package cn.jofei.client.netty.job;

import cn.jofei.client.netty.SocketServerConnector;
import cn.jofei.common.thread.ScheduledJob;
import lombok.extern.slf4j.Slf4j;

/**
 * ReConnectJob
 *
 * @author Jofei Bao
 * @version ngbao v2.0
 * @date 2022年10月23日 16:07
 */
@Slf4j
public class ReConnectJob extends ScheduledJob {
    public ReConnectJob() {
        taskName = "远程连接";
    }

    @Override
    public void run() {
        try {
            log.info("尝试重新连接");
            new SocketServerConnector().start();
        } catch (Exception e) {
            log.error("重新连接失败：{}", e.getMessage());
        }
    }
}
